<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background: red;
        }

        div[id='box'] {
            background: green;
        }

        div[class='box'] {
            background: blue;
        }

        li[color] {
            background: red;
        }

        li[color='blue'] {
            background: blue;
        }
    </style>
</head>
<body>
<div class="box" id="box"></div>
<ul>
    <!--html5开始支持自定义属性-->
    <li color="red">red</li>
    <li color="green">green</li>
    <li color="blue">blue</li>
    <li color="yellow">yellow</li>
    <li color="pink">pink</li>
</ul>

</body>
</html>